inspector: string fixes
authorMatthias Clasen <mclasen@redhat.com>
Mon, 19 May 2014 04:17:23 +0000 (00:17 -0400)
committerMatthias Clasen <mclasen@redhat.com>
Mon, 19 May 2014 04:17:23 +0000 (00:17 -0400)
Mark user-visible strings for translation in the new property editor.

gtk/inspector/prop-editor.c
po/POTFILES.in

index 01de8acc5562c1a8180d860f77457e15c94bea05..91562b47931e31e9a0bcb71f3efa1979b044a201 100644 (file)
@@ -15,6 +15,8 @@
  * License along with this library. If not, see <http://www.gnu.org/licenses/>.
  */
 
+#include "config.h"
+#include <glib/gi18n-lib.h>
 #include "prop-editor.h"
 #include "widget-tree.h"
 
@@ -589,7 +591,7 @@ pointer_changed (GObject *object, GParamSpec *pspec, gpointer data)
 
   g_object_get (object, pspec->name, &ptr, NULL);
 
-  str = g_strdup_printf ("Pointer: %p", ptr);
+  str = g_strdup_printf (_("Pointer: %p"), ptr);
   gtk_label_set_text (label, str);
   g_free (str);
 }
@@ -604,8 +606,8 @@ object_label (GObject *obj, GParamSpec *pspec)
   else if (pspec)
     name = g_type_name (G_PARAM_SPEC_VALUE_TYPE (pspec));
   else
-    name = "unknown";
-  return g_strdup_printf ("Object: %p (%s)", obj, name);
+    name = C_("type name", "Unknown");
+  return g_strdup_printf (_("Object: %p (%s)"), obj, name);
 }
 
 static void
@@ -975,7 +977,7 @@ property_widget (GObject                *object,
       prop_edit = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 5);
 
       label = gtk_label_new ("");
-      button = gtk_button_new_with_label ("Properties");
+      button = gtk_button_new_with_label (_("Properties"));
       g_signal_connect_swapped (button, "clicked",
                                 G_CALLBACK (object_properties),
                                 editor);
@@ -1029,7 +1031,7 @@ property_widget (GObject                *object,
     }
   else
     {
-      msg = g_strdup_printf ("uneditable property type: %s",
+      msg = g_strdup_printf (_("Uneditable property type: %s"),
                              g_type_name (G_PARAM_SPEC_TYPE (spec)));
       prop_edit = gtk_label_new (msg);
       g_free (msg);
index add5372fb0109fad890c190363a82f484c146376..fcb52c3bb28ff02990b79a9817b6ec9c362bee43 100644 (file)
@@ -279,6 +279,7 @@ gtk/inspector/general.ui.h
 gtk/inspector/inspect-button.c
 gtk/inspector/object-hierarchy.ui.h
 gtk/inspector/prop-list.ui.h
+gtk/inspector/prop-editor.c
 gtk/inspector/resource-list.ui.h
 gtk/inspector/signals-list.c
 gtk/inspector/signals-list.ui.h